<ion-menu [content]="content" (ionOpen)="ionDrag()">
    <ion-header>

        <ion-navbar class="navbar" id="loginState" *ngIf="loginState == 0">
            <div menuClose class="userInfo" (click)="UserInfoWindow()">
                <img src="" [src]="user_pic"> 
                <div>
                    <span [innerHTML]="user_name" ></span>
                </div>
            </div>

            
        </ion-navbar>
        <ion-navbar class="navbar" id="loginState" *ngIf="loginState != 0">
            <div menuClose class="userInfo" (click)="UserInfoWindow()">
                <img src="" [src]="user_pic"> 
                <div>
                    <span [innerHTML]="user_name" ></span>
                </div>
            </div>

            
        </ion-navbar>

    </ion-header>

    <ion-content scroll="false" class="app">
        
        <ion-list>

            <ion-item menuClose ion-item *ngFor="let p of pages" (click)="openWindow(p);" class="nav-list">
                <!-- <ion-icon name="leaf" item-start></ion-icon> -->
                <img src="{{p.img}}" class="item-icon">
                <span>
                     {{p.title}}
                </span>
                <!-- <ion-badge item-end>2</ion-badge> -->
            </ion-item>
        </ion-list>
        
    </ion-content>

</ion-menu>

<!-- Disable swipe-to-go-back because it's poor UX to combine STGB with side menus -->
<ion-nav [root]="rootPage" #content swipeBackEnabled="false"></ion-nav>
